<div class="s_banner"><img src="images/banner2.png"></div>
<div class="log_down">
<form id="form1" name="form1" action="register-post.php" method="post">
  <div class="log_form">
    <p>输入您的Yiduo Id 和密码</p>
    <p class="sign_form_i">
      <label>Yiduo Id:</label>
      <input type="text" placeholder="Email(这将是您的Yiduo Id)" class="username" name="usernc" id="usernc">
	  <label class="validate"></label>
    </p>
    <p class="sign_form_i">
      <label>登录密码:</label>
      <input type="password" placeholder="6~14位字母或数学" class="psw" name="password" id="password">
	  <label class="validate"></label>
    </p>
    <p class="sign_form_i">
      <label>确认密码:</label>
      <input type="password" placeholder="请再输入一次密码" class="psw" name="confirm_password" id="confirm_password">
	  <label class="validate"></label>
    </p>
    <p class="sign_form_i">
      <label>公司:</label>
      <input type="text" placeholder="选填" class="psw" name="company">
    </p>
    <p class="sign_form_i sign_form_tip">我已阅读<a href="protocal.php" target="_blank">《同意用户协议》</a>
      <input type="checkbox" class="check_df" name="chk_agree" id="chk_agree">
	  <label class="validate"></label>
    </p>
    <p class="sign_form_i sign_sub">已有账号？&emsp;<a href="login.php" class="log_st">直接登录</a><a id="btn_sign" href="JavaScript:void(0);" class="btn_sign">创建YiDuo ID</a></p>
  </div>
</form>
  <div class="log_info">
    <p class="log_info_t">您可以使用自己的Yiduo Id 来享用Yiduo 服务，如：</p>
    <p>1>知识库访问</p>
    <p>2>积分礼品兑换</p>
    <p>3>客户代表预约</p>
    <p>4>注册成功即送10积分(等同采购价值1000元物品)</p>
	<br/>
	<p style="color:red" id="msg"></p>
  </div>
</div>
{literal} 
<script type="text/javascript">
	$('#form1').validate({
		rules: 
		{
			usernc: {
			required: true,
			email: true
			},
			password: {
			required: true,
			minlength: 6
			},
			confirm_password: {
			required: true,
			minlength: 6,
			equalTo: "#password"
			},
			chk_agree:{
			required: true
			}
		},
		messages: 
		{
			usernc: {
			required: "请输入电子邮箱地址（这将是您的Yiduo Id)",
			email: "请输入电子邮箱地址（这将是您的Yiduo Id)"
			},
			password: {
			required: "请输入密码",
			minlength: jQuery.format("密码不能小于{0}个字符")
			},
			confirm_password: {
			required: "请输入确认密码",
			minlength: "确认密码不能小于5个字符",
			equalTo: "两次输入密码不一致"
			},
			chk_agree:{
			required: "请确认已阅读协议"
			}
		},
		errorPlacement: function(error, element) {       
			error.appendTo(element.next());      
		}
	});
	
	$('#btn_sign').click(function(){
		if($("#form1").validate()){
		 $("#form1").submit();
	 }
	});
</script>
{/literal} 